package org.springblade.mes.system.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.NullSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springblade.core.tenant.mp.TenantEntity;

/**
 * 供应商信息
 *
 * @author 翁金川
 * @since 2023-01-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("sum_supplier")
@ApiModel(value = "Supplier对象", description = "供应商信息")
public class Supplier extends TenantEntity {

    private static final long serialVersionUID = 1L;

    private String createUserName;

    private String updateUserName;

    /**
     * 大众编码
     */
    @ApiModelProperty(value = "大众编码")
    private String fawCode;

    /**
     * 供应商编码(SAP)
     */
    @ApiModelProperty(value = "供应商编码(SAP)")
    private String supplierCode;

    /**
     * 供应商编码
     */
    @ApiModelProperty(value = "供应商编码")
    private String supplierNo;

    /**
     * 供应商名称
     */
    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    /**
     * 供应商名称简称
     */
    @ApiModelProperty(value = "供应商名称简称")
    private String supplierNameAbbr;

    /**
     * 供应商类型:二配供应商,自发包供应商,取货供应商,国外供应商
     */
    @ApiModelProperty(value = "供应商类型:二配供应商,自发包供应商,取货供应商,国外供应商")
    private String supplierType;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 采购凭证
     */
    @ApiModelProperty(value = "采购凭证")
    private String purchaseCertificate;

    /**
     * 取货提前期
     */
    @ApiModelProperty(value = "取货提前期")
    private Integer leadTime;

    /**
     * 送货地点
     */
    @ApiModelProperty(value = "送货地点")
    private String placeOfDelivery;

    /**
     * 供应商通过名称或者编码去搜索
     */
    @ApiModelProperty(value = "供应商通过名称或者编码去搜索")
    @TableField(exist = false)
    private String supplierNameCode;

    /**
     * 包装方式名称
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "包装方式名称")
    private String packagingUnitName;

    @ApiModelProperty("数据状态,(1:新增,2:更改,3:删除)")
    @TableField(exist = false)
    private String dataStatus;

    @ApiModelProperty(value = "sap类型")
    private String sapType;

    /**
     * 序号
     */
    @ApiModelProperty(value = "序号")
    @TableField(exist = false)
    private Integer number;

    /**
     * 物料id
     */
    @ApiModelProperty(value = "物料id")
    @TableField(exist = false)
    private Long materialId;

    @ApiModelProperty(value = "物料名称")
    @TableField(exist = false)
    private String materialName;

    @ApiModelProperty(value = "取货提前期")
    @TableField(exist = false)
    private String leadTimeString;

    @ApiModelProperty(value = "供应商类型:二配供应商,自发包供应商,取货供应商,国外供应商,多个用逗号分开")
    @TableField(exist = false)
    private String supplierTypes;

    /**
     * 取货计划接收时限(h)
     */
    @ApiModelProperty("取货计划接收时限(h)")
    @JsonSerialize(nullsUsing = NullSerializer.class)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private Integer planAcceptDeadline;

    /**
     * 当前供应商的运输商编码(SAP码)
     */
    @ApiModelProperty(value = "当前供应商的运输商编码(SAP码)")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String carrierSupplierCode;

    /**
     * 当前供应商的运输商名称
     */
    @ApiModelProperty(value = "当前供应商的运输商名称")
    @TableField(exist = false)
    private String carrierSupplierName;

    @ApiModelProperty(value = "联系人")
    private String contacts;

    @ApiModelProperty(value = "联系方式")
    private String contactWay;

    @ApiModelProperty(value = "供应商地址")
    private String supplierAddress;
    /**
     * 2025.03.15新增字段
     */
    @ApiModelProperty(value = "快捷码")
    private String speedNumber;
    @ApiModelProperty(value = "采购员id")
    private String purchaserId;
    @ApiModelProperty(value = "采购员")
    private String purchaserName;
    @ApiModelProperty(value = "付款方式")
    private String payMethod;
    @ApiModelProperty(value = "供应商等级")
    private String supplierLevel;
    @ApiModelProperty(value = "传真")
    private String faxNo;
    @ApiModelProperty(value = "纳税人识别号")
    private String registerNumber;
    @ApiModelProperty(value = "银行账号")
    private String accountNumber;
    @ApiModelProperty(value = "开户银行")
    private String openBank;
    @ApiModelProperty(value = "发票地址")
    private String address;
    @ApiModelProperty(value = "发票类型")
    private String invoiceType;
    @ApiModelProperty(value = "税率")
    private String taxRate;
    /**
     * 2025.04.01新增字段
     */
    @ApiModelProperty(value = "合作状态")
    private String cooperateStatus;
    @ApiModelProperty(value = "主营业务产品")
    private String mainBusinessProduct;

    @ApiModelProperty(value = "其他系统编码")
    private String otherSysCode;
    @ApiModelProperty(value = "其他系统编码2")
    private String otherSysCode2;
    @ApiModelProperty(value = "文件名称")
    private String fileName;
    @ApiModelProperty(value = "附件路径")
    private String fileUrl;

    @ApiModelProperty(value = "币种")
    private String transactionCurrency;
}
